package com.shandiangou.crm.model.vo;

import com.shandiangou.market.ak47.request.extra.SourcePageEnum;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 红包发放的VO类
 */
public class HongbaoVo {

    @Min(value= 0 ,message= "红包金额不能小于0" )
    @Max(value = 1000,message = "红包金额不能大于10元")
    @NotNull(message = "红包金额不能为空")
    private int price; //红包金额  单位分

    @Length(min=11,max=11,message = "mobile必须是11位的手机号码")
    @NotNull(message = "mobile不能为空")
    private String mobile; //红包给哪个用户的手机号码

    @NotNull(message = "红包有效期结束时间不能为空")
    private Date expirationTime; //红包有效期结束时间

    @NotNull(message = "红包有效期开始时间不能为空")
    private Date startTime;//红包有效期开始时间

    @Length(min=1,max=12,message = "红包名称必须是1-12个汉字")
    @NotNull(message = "红包名称不能为空")
    private String couponName;//红包名称

    @Length(min=1,max=64,message = "订单编号不能大于64位")
    @NotNull(message = "订单编号不能为空")
    private String orderId;//订单编号

    @Length(min=4,max=150,message = "发送原因必须是是4-150个汉字")
    @NotNull(message = "发送原因不能为空")
    private  String reason;//发送原因

    private SourcePageEnum sourcePageEnum;//红包使用场景  主要是普通红包 和拼团红包

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getMobile() {
        return mobile;
    }

    private boolean unlimited = false;

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Date getExpirationTime() {
        return expirationTime;
    }

    public void setExpirationTime(Date expirationTime) {
        this.expirationTime = expirationTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public String getCouponName() {
        return couponName;
    }

    public void setCouponName(String couponName) {
        this.couponName = couponName;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public boolean isUnlimited() {
        return unlimited;
    }

    public void setUnlimited(boolean unlimited) {
        this.unlimited = unlimited;
    }

    public SourcePageEnum getSourcePageEnum() {
        return sourcePageEnum;
    }

    public void setSourcePageEnum(SourcePageEnum sourcePageEnum) {
        this.sourcePageEnum = sourcePageEnum;
    }
}
